home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
VISUALBA
/
VBUTIL.ZIP
/
SCICALC2.FRM
(
.txt
)
< prev
next >
Wrap
Visual Basic Form
|
1993-03-04
|
9KB
|
192 lines
Form1
Scientific Calculator (Ver. 2)
Form1%
Operand1Box
Operand2Box
ResultBox
OperatorCmb
SubstituteChk
Auto Substitute
AngleModeFrm
Angle Mode
RadianOpt
Radian
DegreeOpt
Degree
GradOpt
ErrorMessageBox
ExecuteBtn
Execute
QuitBtn
StoreBtn
Store
VariableBox
SelectChk
Auto Select Next Variable Name
Operand1Lbl
Operand 1
OperatorLbl
Operator
Operand2Lbl
Operand 2
ResultLbl
Result
ErrorMessageLbl
Error Message
VariableLbl
Variable
Command2_Click
QuitBtn_Click
StoreBtn_Click
VariableBox
ErrorMessageBox
Index
ResultBox
ResultBox_Change
OperatorBox_Change
Operand2Box_Change
Operand1Box_ChangeD
Label6_ClickT
Label5_Clickd
Label4_Clickt
Label3_Click
Label2_Click
Label1_Click
Form_Click
ExecuteBtn_Click,
ErrorMessageBox_Change
Operand1Box
Operand2Box+
OperatorBox
ErrorFlag
Xchar
YChar=
Cchar
VariableBox_Changep
ErrorMesageBox{
ASCII_A
TheVars
InvalidY
False
InValifY
ErrorMsesageBox
ErrorMes
sageBox
IfEnd|
ErroressageBox
InValid
numeric
operand5
displayJ
Operand1Lbl_Click_
Operand2Lbl_Click
OperatorLbl_ClickL
ErrorMessageLbl_Click
OperatorBox_DragDrop
Source_
OperatorBox_DragOver
State
OperatorBox_GotFocus\
OperatorBox_KeyDown
KeyCode7
Shift,
OperatorBox_KeyPress
KeyAsciiD
OperatorBox_KeyUp
ResultLbl_Clicki
Op1Strs
Op2Str
OpStr
SelectChk
Value
SubtituteChk_Click
SubstituteChk
RadOpt
RadianOpt
DegreeOpt
GradOpt
OperatorCmb
@ Form_Load
Sortedt
OperatorCmb_Change
OperatorCmb_KeyPress
OperatorCmb_DragDrop
OperatorCmb_DropDown
WindowState
Operator
combo
Operand1Box_KeyPress
Operand2Box_KeyPress
VariableBox_KeyPress
RadianOpt_Click
DegreeOpt_Click
SelectChk_Click
Form12
ErrorMessageLbl_Click
ExecuteBtn_Click
clear error message box
clear result boxa
is the Auto Substitute check box marked
obtain the first character in the
Operand1Box text boxb
obtain the first character in the
Operand2Box text boxb
convert string in Operand1Box text box to its
numeric value. Note that if the conversion fails,l
X will be assigned a zero.i
is X = 0 when Xchar is not "0"? This test detects
failed conversionsr
Yes! Is Xchar in the range A to Zh
treat the content of Operand1Box as storing
the name of a variable. Assign the value ofa
the variable to X
convert text in Operand2Box to numeric valuea
check if Operand2Box has a variable
Yes! there is a variable. Assign its
value to variable Y
examine the content of the OperatorBox text box
Division by zero error
simply copy the value of the firsts
operand into the result box
Bad function argument
Bad function argument
Bad function argument
Invalid operator
if the error message box is still empty, there is
no error. Therefore, convert the variable Z into
a string and display it in ResultBoxr
Form_Load
set window to maximized state
insert list of operators and functions in the
Operator combo boxx
select the Dgree option box
insert the variable A into the variable box
calculate Pia
Operand1Box_KeyPress
Operand1Lbl_Click
get the first character in the Operand1Box
is the character in the range A to Z?
Yes! Obtain the variable from the array and writew
its numeric value to the text box
Operand2Box_KeyPress
Operand2Lbl_Click
get the first character in thet
Operand2Box
is the character in the range A to Z?
Yes! Obtain the variable from the array and writer
its numeric value to the text box
QuitBtn_Click
StoreBtn_Click
process the contents of the Variable text box
obtain the upeprcase of the first character in the text box
is the character in the range A to Z?
Yes! Get the ASCII code for the character
store the value of the Result box in the array TheVars#
clear the error message box
select the next variablea
No! The text box has an invalid variable name
Invalid variable name
the text box is empty!n
Missing variable name
VariableBox_KeyPress